#version 130

//in vec2 texCoordOut;
uniform sampler2D image;
varying float z;
in vec2 outTexCoord;

void main()
{
	//Apply color
	//gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
	gl_FragColor = gl_Color;
	gl_FragColor += texture2D(image, outTexCoord);

	//Apply a small red shade on the right side of the screen
	//float shade = 0.02f *(gl_FragCoord.x /100.0);
	//gl_FragColor.r += shade;
	//gl_FragColor.b += shade/2;

	//Apply some fade-out on far away objects
	//float fadeout = 0.2f *(z /30.0f);
	//gl_FragColor.r -= fadeout *0.7f;
	//gl_FragColor.g -= fadeout *0.9f;
	//gl_FragColor.b -= fadeout *1.0f;

	//gl_FragColor = texture(image, texCoordOut);
}
